//
//  WSQuestionDetailHeader.m
//  WisdomStar
//
//  Created by 谭飞 on 2018/11/1.
//  Copyright © 2018年 zhangliwen. All rights reserved.
//

#import "WSQuestionDetailHeader.h"

#import "QuestionDetailInfo.h"

@interface WSQuestionDetailHeader ()

@property (weak, nonatomic) IBOutlet UILabel *nickNameLab;

@property (weak, nonatomic) IBOutlet UILabel *titleLab;

@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@property (weak, nonatomic) IBOutlet UILabel *timeLab;

@property (weak, nonatomic) IBOutlet UIView *commentView;

@end

@implementation WSQuestionDetailHeader

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self.commentView setBorder:kSeparatorColor borderWidth:0.5f borderType:UIBorderSideTypeBottom];
}

- (CGFloat)contentHeight {
    return self.contentLabel.xmg_bottom + 70.f;
}

- (void)setDetail:(QuestionDetailInfo *)detail {
    self.titleLab.text = detail.title;
    self.nickNameLab.text = detail.nickname;
    self.timeLab.text = detail.push_time;
    self.contentLabel.text = detail.content;
}

@end
